package com.ms.demo.demo2;

/**
 * @description: 创建抽象中介者
 * @author: ms
 * @create: 2022-10-28 11:00
 */
public abstract class Mediator {

    protected ConcreteColleagueA colleagueA;    //具体同事A
    protected ConcreteColleagueB colleagueB;    //具体同事B

    public void setColleageA(ConcreteColleagueA colleague) {
        this.colleagueA = colleague;
    }

    public void setColleageB(ConcreteColleagueB colleague) {
        this.colleagueB = colleague;
    }

    // 中介者业务逻辑
    public abstract void transferA();

    public abstract void transferB();
}
